<%@ page import="nusarPruebas.Materia" %>



<div class="fieldcontain ${hasErrors(bean: materiaInstance, field: 'nombre', 'error')} required">
	<label for="nombre">
		<g:message code="materia.nombre.label" default="Nombre" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nombre" required="" value="${materiaInstance?.nombre}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: materiaInstance, field: 'alumnos', 'error')} ">
	<label for="alumnos">
		<g:message code="materia.alumnos.label" default="Alumnos" />
		
	</label>
	
</div>

<div class="fieldcontain ${hasErrors(bean: materiaInstance, field: 'diashoras', 'error')} ">
	<label for="diashoras">
		<g:message code="materia.diashoras.label" default="Diashoras" />
		
	</label>
	<g:select name="diashoras" from="${nusarPruebas.DiaHora.list()}" multiple="multiple" optionKey="id" size="5" value="${materiaInstance?.diashoras*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: materiaInstance, field: 'solicitudes', 'error')} ">
	<label for="solicitudes">
		<g:message code="materia.solicitudes.label" default="Solicitudes" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${materiaInstance?.solicitudes?}" var="s">
    <li><g:link controller="solicitud" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="solicitud" action="create" params="['materia.id': materiaInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'solicitud.label', default: 'Solicitud')])}</g:link>
</li>
</ul>

</div>

